package com.cjr.ddp.service.impl;

import com.cjr.ddp.dao.UserDao;
import com.cjr.ddp.entity.User;
import com.cjr.ddp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author cjr
 * @date Created in 2020-03-05 20:54
 * @description
 * @modified By
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDao userDao;

    @Override
    public User selectUserByLoginInfo(User user) {
        return userDao.selectUserByLoginInfo(user);
    }

    @Override
    public int insertUser(User user) {
        return userDao.insertUser(user);
    }

    @Override
    public int deleteUserByUserId(int id) {
        return userDao.deleteUserByUserId(id);
    }

    @Override
    public int updateUserByUserID(User user) {
        return userDao.updateUserByUserID(user);
    }

    @Override
    public List<User> selectUserList() {
        return userDao.selectUserList();
    }

    @Override
    public List<User> selectUserByUserName(User user) {
        return userDao.selectUserByUserName(user);
    }
}
